package com.leaf.core.bean.product;

import java.io.Serializable;

public class BrandQuery implements Serializable {

	private static final long serialVersionUID = 1L;

	private Integer id;

	private String name;

	private String description;

	private String imgUrl;

	private Integer sort;

	private Integer isDisplay;

	private Integer pageNo = 1;

	private Integer pageSize = 10;
	
	/**
	 * 开始行 
	 * 	需计算开始行数 开始行=(当前页-1)*每页显示的条数 
	 * 	所以当设置当前页和每页显示参数的时候需计算出开始行
	 */
	private Integer startRow;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public Integer getIsDisplay() {
		return isDisplay;
	}

	public void setIsDisplay(Integer isDisplay) {
		this.isDisplay = isDisplay;
	}

	public Integer getPageNo() {
		return pageNo;
	}

	public void setPageNo(Integer pageNo) {
		// 计算开始行
		this.startRow = (pageNo - 1) * pageSize;
		this.pageNo = pageNo;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		//计算开始行
		this.startRow = (pageNo - 1) * pageSize;
		this.pageSize = pageSize;
	}

	public Integer getStartRow() {
		return startRow;
	}

	public void setStartRow(Integer startRow) {
		this.startRow = startRow;
	}

	@Override
	public String toString() {
		return "BrandQuery [id=" + id + ", name=" + name + ", description=" + description + ", imgUrl=" + imgUrl
				+ ", sort=" + sort + ", isDisplay=" + isDisplay + ", pageNo=" + pageNo + ", pageSize=" + pageSize
				+ ", startRow=" + startRow + "]";
	}

}
